#include<iostream>
#include<vector>
using std::vector;


class Solution {
public:
    vector<vector<int>> subsets(vector<int>& nums) {
        vector<vector<int>> results;
        vector<int> prev;
        gen(prev, 0, nums, results);
        return results;
    }

    void gen(vector<int>& prev, int idx, vector<int>& nums, vector<vector<int>>& results) {
        if (idx == nums.size()) {
            results.push_back(prev);
            return;
        }
        else {
            gen(prev, idx+1, nums, results);
            prev.push_back(nums[idx]);
            gen(prev, idx+1, nums, results);
            prev.pop_back();
        }
    }
};

int main() {
    vector<int> input;
    int a;
    while (std::cin >> a) input.push_back(a);
    for (auto n: input) std::cout << n << " ";
    std::cout << "\n";
    auto result = Solution().subsets(input);
    for (auto& v: result) {
        std::cout << "[";
        for (auto n: v) std::cout << n << " ";
        std::cout << "]\n";
    }
    return 0;
}